﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ControlTemplate x:Key="DefaultButtonTemplate" TargetType="{x:Type Button}">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                Background="{TemplateBinding Background}" Name="Border">
            <Grid>
                <Rectangle Name="FocusRect" Visibility="Hidden" Stroke="Black"
                           StrokeThickness="1" StrokeDashArray="1 2"
                           SnapsToDevicePixels="True" />
                <Rectangle Name="HighlightRect" Visibility="Hidden" Fill="#88A7D9F5"
                           SnapsToDevicePixels="True" />
                <Rectangle Name="PressedRect" Visibility="Hidden" Fill="#33000000"
                           SnapsToDevicePixels="True" />
                <ContentPresenter RecognizesAccessKey="True"
                                  Margin="{TemplateBinding Padding}"></ContentPresenter>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="HighlightRect" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="PressedRect" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsKeyboardFocused" Value="True">
                <Setter TargetName="FocusRect" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Border" Property="TextBlock.Foreground" Value="Gray" />
                <Setter TargetName="Border" Property="BorderBrush" Value="DarkGray" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
        <Setter Property="Template" Value="{StaticResource DefaultButtonTemplate}" />
    </Style>
    
    <Style x:Key="IconButton" TargetType="{x:Type Button}">
    </Style>
</ResourceDictionary>